<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
  //import Hello from './components/Hello'
//  import {
//          islogin,
//          loading,
//  } from './common/api/api';
  import { Toast ,Indicator} from 'mint-ui';
  export default {
    name: 'app',
    data () {
      return {
        test : null
      }
    },
    components: {
      //Hello
    },
    methods: {

    },
    mounted() {
      let vm = this
      this.$http.get(`${ apiBase }ops/index/index`, {}, {
        headers: {

        },
        emulateJSON: true
      }).then(function(response) {
        // 这里是处理正确的回调
        let data = response.body
        vm.test = data.data;
        if(!data.data){
          this.$router.push('/');
        }
      }, function(response) {
        // 这里是处理错误的回调
        console.log(response)
      });
    }
  }
</script>

<style>
  body{
    background-color: #f8f8ff;
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    color: #2c3e50;
  }


  .nav{
    position: fixed;
    width: 108px;
    left: 40px;
  }
  .nav ul{
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav ul li{
    width: 108px;
    height: 48px;
    line-height: 48px;
    border:1px solid #dadada;
    text-align: center;
  }
  .nav ul li a{
    text-decoration: none;
  }

  .main{
    height: 400px;
    margin-left: 180px;
    margin-right: 25px;
  }

</style>